import request from "@/utils/request";
import qs from "qs";
import { Base64 } from "js-base64";
import {
  ordinaryList_,
  EcartsCangku_,
  ordinaryListSearch_,
  dispatchingAttach_,
  logistics_,
  nameActivity_,
  logisticsInformation_,
  orderDetails_,
} from "../urlApi";

// 订单列表
export function ordinaryList(data) {
  return request({
    url: ordinaryList_,
    headers: {
      repeatSubmit: false,
      "Content-Type": "application/json",
    },
    method: "post",
    data: JSON.stringify(data),
  });
}
// 订单搜索列表
export function ordinaryListSearch(data) {
  return request({
    url: ordinaryListSearch_,
    headers: {
      repeatSubmit: false,
      "Content-Type": "application/json",
    },
    method: "post",
    data: JSON.stringify(data),
  });
}
// 配送专员
export function dispatchingAttach(data) {
  return request({
    url: dispatchingAttach_,
    headers: {
      repeatSubmit: false,
      "Content-Type": "application/json",
    },
    method: "post",
    data: JSON.stringify(data),
  });
}
// 物流公司
export function logistics() {
  return request({
    url: logistics_,
    method: "post",
    data: {},
  });
}

// 商品下拉
export function nameActivity(data) {
  return request({
    url: nameActivity_,
    headers: {
      repeatSubmit: false,
    },
    method: "post",
    data: qs.stringify(data),
  });
}
// 仓库
export function EcartsCangku(data) {
  return request({
    url: EcartsCangku_,
    headers: {
      repeatSubmit: false,
      "Content-Type": "application/json",
    },
    method: "post",
    data: JSON.stringify(data),
  });
}

// 物流信息
export function logisticsInformation(data) {
  return request({
    url: logisticsInformation_,
    headers: {
      repeatSubmit: false,
    },
    method: "post",
    data: qs.stringify(data),
  });
}
// 详情
export function orderDetails(data) {
  return request({
    url: orderDetails_,
    headers: {
      repeatSubmit: false,
    },
    method: "post",
    data: qs.stringify(data),
  });
}
